<header class="header">
    <a href="{:U('Admin/index/index')}" class="logo" id="logo" style="font-size: 30px">GreenCMS</a>
    <nav class="navbar navbar-static-top" role="navigation">


        <!-- Sidebar toggle button-->
        <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>


        <ul class="nav navbar-nav">
            <li class="dropdown messages-menu">
                <a href="{:U('Admin/Index/main')}" class="dropdown-toggle" target="_blank">主页模块
                </a>
            </li>

            <!--<control access="Weixin/Index/index">-->
            <!--<li><a href="{:U('Weixin/Index/index')}" target="_blank">Weixin模块</a></li>-->
            <!--</control>-->

            <control access="Admin/Data/clearAll">
                <li><a href="{:U('Admin/Data/clearAll')}">一键缓存清理</a></li>
            </control>


            <!--<li class="dropdown messages-menu">-->
            <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown">-->
            <!--模块切换-->
            <!--</a>-->
            <!--<ul class="dropdown-menu">-->
            <!--<li>-->

            <!--&lt;!&ndash; inner menu: contains the actual data &ndash;&gt;-->
            <!--<ul class="menu">-->
            <!--<control access="Weixin/Index/index">-->
            <!--<li><a href="{:U('Weixin/Index/index')}" target="_blank"><h4>进入Weixin模块</h4></a></li>-->
            <!--</control>-->


            <!--<li><a href="{:U('Admin/Index/main')}" target="_blank"><h4>进入Home模块</h4></a></li>-->
            <!--&lt;!&ndash; end message &ndash;&gt;-->

            <!--</ul>-->
            <!--</li>-->
            <!--</ul>-->
            <!--</li>-->


            <li class="dropdown messages-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    快速访问 <i class="fa  fa-caret-square-o-down"></i>
                </a>
                <ul class="dropdown-menu">
                    <li>

                        <!-- inner menu: contains the actual data -->
                        <ul class="menu">


                            <control access="Admin/Posts/add">
                                <li><a href="{:U('Admin/Posts/add')}"><h4>文章发布</h4></a></li>
                            </control>

                            {:hook('adminMenu', 'menu')}

                            <!-- end message -->

                        </ul>
                    </li>
                </ul>
            </li>


        </ul>

        <div class="navbar-right">
            <ul class="nav navbar-nav">
                <!--&lt;!&ndash; Messages: style can be found in dropdown.less&ndash;&gt;-->
                <!--<li class="dropdown messages-menu">-->
                    <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown">-->
                        <!--<i class="fa fa-envelope"></i>-->
                        <!--<span class="label label-success" id="message_box_num">1</span>-->
                    <!--</a>-->
                    <!--<ul class="dropdown-menu">-->
                        <!--<li class="header">你有 <span id="message_box_num2">1</span>条新消息</li>-->
                        <!--<li>-->
                            <!--&lt;!&ndash; inner menu: contains the actual data &ndash;&gt;-->
                            <!--<ul class="menu" id="message_box">-->
                                <!--<li>&lt;!&ndash; start message &ndash;&gt;-->
                                    <!--<a href="#">-->
                                        <!--<div class="pull-left">-->
                                            <!--<img src="__PUBLIC__/baracktocat.jpg" class="img-circle" alt="User Image"/>-->
                                        <!--</div>-->
                                        <!--<h4>-->
                                            <!--GreenCMS Team-->
                                            <!--<small><i class="fa fa-clock-o"></i> 5 mins</small>-->
                                        <!--</h4>-->
                                        <!--<p>欢迎使用</p>-->
                                    <!--</a>-->
                                <!--</li>-->
                                <!--&lt;!&ndash; end message &ndash;&gt;-->

                            <!--</ul>-->
                        <!--</li>-->
                        <!--<li class="footer"><a href="#">查看所有消息</a></li>-->
                    <!--</ul>-->
                <!--</li>-->
                <!--&lt;!&ndash; Notifications: style can be found in dropdown.less &ndash;&gt;-->
                <!--<li class="dropdown notifications-menu">-->
                    <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown">-->
                        <!--<i class="fa fa-warning"></i>-->
                        <!--<span class="label label-warning" id="warning_box_num">0</span>-->
                    <!--</a>-->
                    <!--<ul class="dropdown-menu">-->
                        <!--<li class="header">你有<span id="warning_box_num2">0</span>条提醒</li>-->
                        <!--<li>-->
                            <!--&lt;!&ndash; inner menu: contains the actual data &ndash;&gt;-->
                            <!--<ul class="menu" id="warning_box">-->
                                <!--&lt;!&ndash;<li>&ndash;&gt;-->
                                <!--&lt;!&ndash;<a href="#">&ndash;&gt;-->
                                <!--&lt;!&ndash;<i class="ion ion-ios7-people info"></i> 5 new members joined today&ndash;&gt;-->
                                <!--&lt;!&ndash;</a>&ndash;&gt;-->
                                <!--&lt;!&ndash;</li>&ndash;&gt;-->
                                <!--&lt;!&ndash;&ndash;&gt;-->

                            <!--</ul>-->
                        <!--</li>-->
                        <!--<li class="footer"><a href="#">查看所有提醒</a></li>-->
                    <!--</ul>-->
                <!--</li>-->
                <!--&lt;!&ndash; Tasks: style can be found in dropdown.less &ndash;&gt;-->
                <!--<li class="dropdown tasks-menu">-->
                    <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown">-->
                        <!--<i class="fa fa-tasks"></i>-->
                        <!--<span class="label label-danger">0</span>-->
                    <!--</a>-->
                    <!--<ul class="dropdown-menu">-->
                        <!--<li class="header">你有0个任务</li>-->
                        <!--<li>-->
                            <!--&lt;!&ndash; inner menu: contains the actual data &ndash;&gt;-->
                            <!--<ul class="menu">-->
                                <!--&lt;!&ndash; Task item &ndash;&gt;-->

                                <!--&lt;!&ndash;<li>&ndash;&gt;-->
                                <!--&lt;!&ndash;<a href="#">&ndash;&gt;-->
                                <!--&lt;!&ndash;<h3>&ndash;&gt;-->
                                <!--&lt;!&ndash;Design some buttons&ndash;&gt;-->
                                <!--&lt;!&ndash;<small class="pull-right">20%</small>&ndash;&gt;-->
                                <!--&lt;!&ndash;</h3>&ndash;&gt;-->
                                <!--&lt;!&ndash;<div class="progress xs">&ndash;&gt;-->
                                <!--&lt;!&ndash;<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">&ndash;&gt;-->
                                <!--&lt;!&ndash;<span class="sr-only">20% Complete</span>&ndash;&gt;-->
                                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                                <!--&lt;!&ndash;</a>&ndash;&gt;-->
                                <!--&lt;!&ndash;</li>&ndash;&gt;-->

                                <!--&lt;!&ndash; end task item &ndash;&gt;-->

                            <!--</ul>-->
                        <!--</li>-->
                        <!--<li class="footer">-->
                            <!--<a href="#">查看所有</a>-->
                        <!--</li>-->
                    <!--</ul>-->
                <!--</li>-->
                <!--&lt;!&ndash; User Account: style can be found in dropdown.less &ndash;&gt;-->
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="glyphicon glyphicon-user"></i>
                        <span> {$user.user_nicename} <i class="caret"></i></span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header bg-light-blue">
                            <img src="__PUBLIC__/baracktocat.jpg" class="img-circle" alt="User Image"/>

                            <p>
                                {$user.user_nicename} - {$user['role_info'][0]['name']}
                                <small>注册时间: {$user.user_registered}</small>
                            </p>
                        </li>
                        <!--&lt;!&ndash; Menu Body &ndash;&gt;-->
                        <!--<li class="user-body">-->
                        <!--<div class="col-xs-4 text-center">-->
                        <!--<a href="#">One</a>-->
                        <!--</div>-->
                        <!--<div class="col-xs-4 text-center">-->
                        <!--<a href="#">Two</a>-->
                        <!--</div>-->
                        <!--<div class="col-xs-4 text-center">-->
                        <!--<a href="#">Three</a>-->
                        <!--</div>-->
                        <!--</li>-->
                        <!-- Menu Footer-->
                        <li class="user-footer">
                            <div class="pull-left">
                                <a href="{:U('Admin/Access/profile',array('uid'=>$user['user_id']))}"
                                   class="btn btn-default btn-flat">用户档案</a>
                            </div>
                            <div class="pull-right">
                                <a href="{:U('Admin/Login/logout')}" class="btn btn-default btn-flat">安全退出</a>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</header>

